<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width,initial-scale=1.0">
    <title>projects</title>
  </head>
  <body>
    <div id="app"></div>
    <!-- built files will be auto injected -->
    <script src="./static/rem.js"></script>
    <script src="./static/mui.js"></script>
    <script>
    mui.init({
        swipeBack: false, //关闭右滑关闭功能(默认就是false)
        keyEventBind: {
        backbutton: true //开启back按键监听( 默认就是true)
        }
    });
    var quitTime = null;
    mui.plusReady(function(){
    mui.back = function(){
        //首次按键，提示“再按次退出应用’
        if(!quitTime){
        //记录第次按下回退键的时间
        quitTime = new Date().getTime();
        //回退到上一页面
        window.history.go(-1);
        setTimeout(function(){
        //1s中后清除
        quitTime = null;
        },1000);
    }
    else{
           if((new Date().getTime()-quitTime) < 1000){
              plus.runtime.quit();
          }
       }
       };
    });
    </script>
  </body>
</html>
